package org.theqcp.wow.sim.engine.revised.scripts;

import org.theqcp.wow.sim.engine.revised.enums.ImbueType;

public class ImbueFactory extends ScriptedEventObserverFactory<Imbue> {

    private static ImbueFactory imbueFactory = null;

    public static Imbue newObserver( ImbueType type ) throws ClassNotFoundException {
	if( imbueFactory == null ) {
	    imbueFactory = new ImbueFactory();
	}
	return imbueFactory.newEventObserver(type);
    }

    public static Imbue newObserver( String type ) throws ClassNotFoundException {
	if( imbueFactory == null ) {
	    imbueFactory = new ImbueFactory();
	}
	return imbueFactory.newEventObserver(type);
    }

    private final String basePath = "res/imbues/";

    public Imbue newEventObserver( ImbueType type ) throws ClassNotFoundException {
	return (Imbue) super.newEventObserver(type, basePath);
    }

    public Imbue newEventObserver( String type ) throws ClassNotFoundException {
	return (Imbue) super.newEventObserver(type, basePath);
    }

}
